<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <script>
        let liList = document.querySelectorAll("li");
        console.log(liList)
        Array.prototype.slice = function () { //this --> []
        }
        Array.prototype.myFn = function () {
            alert("MyFn Run");
            console.log(this);
        };
        Array.prototype.mySlice = function () {
            let newArr = [];
            newArr = [...this];
            for (let i = 0; i < this.length; i++) {
                newArr.push(this[i])
            }
            return newArr
        };
        // @param {Number} num1
        //  @param num2
        //  @returns {Number} sumNum
        function sum(num1, num2) {
            console.log(arguments);
            console.log(Array.from(arguments));
            let newArgs = Array.prototype.slice.call(arguments);
            let newArgs = [].slice.call(arguments);
            let newArgs = Array.from(arguments);
            let newArgs = [...arguments];
            console.log(newArgs);
            let sumNum = 0;
            for (let i = 0; i < arguments.length; i++) {
                sumNum += arguments[i]
            }
            return sumNum
        }
        console.log(sum(1, 2, 3, 4))
        console.dir({});
        console.dir([]);
    </script>
</body>

</html>